/**
 * Demonstrates a range of Button options the framework offers out of the box
 */
Ext.define('cloud.view.app.AppShow', {
    extend: 'Ext.form.FormPanel',
    xtype: 'appshow',

    requires: ['Ext.form.Panel', 'Ext.form.FieldSet','Ext.field.Toggle', 'Ext.field.Hidden'],
    config: {

        //style:'font-size:14px',
        store: 'AppInfoGetStore',
        title: '显示or编辑',
        items: [
            {
                xtype: 'toolbar',
                docked: 'bottom',
                layout: {
                    type: 'hbox',
                    pack: 'end'
                },
                items: [
                    {
                        id: 'submit_edit',
                        iconMask: true,
                        scope: this,
                        cls:'x-button2',
                        text: '更新',
                        style: 'float:right'
                    }
                ]
            },
            {
                xtype: 'fieldset',
                store: 'AppInfoGetStore',
                title: '详情及更新',
                defaults: {
                    labelwidth: '20%',
                    xtype: 'textfield',
                    required: true,
                    clearIcon: true
                },

                items: [
                    {
                        xtype: 'hiddenfield',
                        name: 'caid'
                    },
                    {
                        id: 'name',
                        name: 'name',
                        label: '应用名',
                        maxLength: 50,
                        placeHolder: '请输应用名'
                    },
                    {
                        id: 'enname',
                        name: 'enname',
                        label: '应用英文名',
                        maxLength: 50,
                        placeHolder: '请输入应用英文名'
                    },
                    {
                        id: 'appStoreId',
                        name: 'appStoreId',
                        required: false,
                        label: 'appleID',
                        maxLength: 50
                    },
                    {
                        id: 'jpushkey',
                        name: 'jpushkey',
                        required: false,
                        label: '极光推送KEY',
                        maxLength: 50

                    },
                    {
                        id: 'jpushSecret',
                        name: 'jpushSecret',
                        required: false,
                        label: '极光推送master',
                        maxLength: 50
                    },
                    {
                        id: 'version',
                        name: 'version',
                        label: '版本',
                        maxLength: 50,
                        placeHolder: '请输入版本'
                    },
                    {
                        id: 'messageCount',
                        name: 'messageCount',
                        label: '短信条数/天',
                        maxLength: 50,
                        placeHolder: '用于找回密码时使用'
                    },
                    {
                        xtype: 'selectfield',
                        id: 'integraltype',
                        name: 'integraltype',
                        label: '积分方式',
                        options: [
                            {
                                text: '选择排序方式',
                                value: ''
                            },
                            {
                                text: '按蛋糕重量获得积分',
                                value: '1'
                            },
                            {
                                text: '按价格获得积分',
                                value: '2'
                            }
                        ]
                    },
                    {
                        xtype: 'togglefield',
                        name: 'disabled',
                        id:'app_disabled',
                        label: '是否启用',
                        labelWidth: '30%'
                    },
                    {
                        xtype: 'textareafield',
                        id: 'discription',
                        name: 'discription',
                        maxLength: 1000,
                        maxRows: 10,
                        label: '应用描述',
                        required: true,
                        clearIcon: false
                    }
                ]
            }
        ]
    }
});

